/*
 * @Descripttion: 
 * @version: 
 * @Author: Writer
 * @Date: 2021-10-11 15:07:19
 * @LastEditors: Writer
 * @LastEditTime: 2021-10-11 15:08:52
 */

const initRem = () => {
  const documentElement = document.documentElement;
  // use rem
  documentElement.style.fontSize = documentElement.getBoundingClientRect().width / 10 + 'px';
}
initRem();

// 监听手机窗口变化，重新设置
window.addEventListener('resize', initRem);